home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17858 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: clients1.news.internex.net!usenet
  2. From: Paul Meyer <pem@radmedia.com>
  3. Newsgroups: comp.os.ms-windows.programmer.tools.winsock,comp.lang.c++,comp.os.ms-windows.programmer.tools.misc
  4. Subject: Re: DDE, C++ and ILOG VIEWS
  5. Date: Tue, 16 Apr 1996 13:34:40 -0700
  6. Organization: RadMedia, Inc.
  7. Message-ID: <31740460.44FE@radmedia.com>
  8. References: <4kljqu$ekf@news.cea.fr>
  9. NNTP-Posting-Host: 205.158.20.71
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (WinNT; I)
  14.  
  15. Buteau wrote:
  16. > Has somebody written some classes that encapsulate the DDE mechanism??
  17. > (I mean a class like DDEclient that you can derive from, and that has
  18. > member functions like send, receive, poke ....)
  19.  
  20. Errr, yes, but it was in the scope of a previous job and thus not suitable
  21. for publication (and in fact I don't have a copy).
  22.  
  23. OTOH it only took me about a week to do the whole thing. Then again, I've
  24. been using C++ since cfront 1.2 so I'm a bit familiar with class design.
  25.  
  26. The real trick is in allowing for the callbacks. DDE is not useful for
  27. nontrivial things unless you use an asynchronous approach. Probably the
  28. easiest design to use is to make the callback function dispatch to several
  29. virtual member functions based on what it gets for parameters. There is
  30. also the problem of deciding which DDE object should get the callback if
  31. you instantiate more than one. I tried using the DDE provision for attaching
  32. a user datum to a conversation, but it turns out that some important callbacks
  33. occur in situations where that datum is not available. I had to fall back
  34. to a runtime lookup table scheme. If you don't need more than one DDE object
  35. in a program, though, this doesn't come up.
  36.  
  37. --
  38. Paul Meyer        | When the Tremere ask you about your style of
  39. pem@radmedia.com  | magic, just feel really confident and say,
  40. pem@amurgsval.org | "These aren't the Druids you're looking for."
  41.